<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Monthly Sunspot Data, from 1749 to &quot;Present&quot;</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="R.css" />
</head><body>

<table width="100%" summary="page for sunspot.month"><tr><td>sunspot.month</td><td style="text-align: right;">R Documentation</td></tr></table>

<h2>Monthly Sunspot Data, from 1749 to &quot;Present&quot;</h2>

<h3>Description</h3>

<p>Monthly numbers of sunspots, as from the World Data Center, aka SIDC.
This is the version of the data that will occasionally be updated when
new counts become available.
</p>


<h3>Usage</h3>

<pre>
sunspot.month
</pre>


<h3>Format</h3>

<p>The univariate time series <code>sunspot.year</code> and
<code>sunspot.month</code> contain 289 and 2988 observations, respectively.
The objects are of class <code>"ts"</code>.
</p>


<h3>Author(s)</h3>

<p>R
</p>


<h3>Source</h3>

<p>WDC-SILSO, Solar Influences Data Analysis Center (SIDC),
Royal Observatory of Belgium, Av. Circulaire, 3, B-1180 BRUSSELS
Currently at <a href="http://www.sidc.be/silso/datafiles">http://www.sidc.be/silso/datafiles</a>
</p>


<h3>See Also</h3>

<p><code>sunspot.month</code> is a longer version of <code>sunspots</code>;
the latter runs until 1983 and is kept fixed (for reproducibility as example
dataset).
</p>


<h3>Examples</h3>

<pre>
require(stats); require(graphics)
## Compare the monthly series
plot (sunspot.month,
      main="sunspot.month &amp; sunspots [package'datasets']", col=2)
lines(sunspots) # -&gt; faint differences where they overlap

## Now look at the difference :
all(tsp(sunspots)     [c(1,3)] ==
    tsp(sunspot.month)[c(1,3)]) ## Start &amp; Periodicity are the same
n1 &lt;- length(sunspots)
table(eq &lt;- sunspots == sunspot.month[1:n1]) #&gt;  132  are different !
i &lt;- which(!eq)
rug(time(eq)[i])
s1 &lt;- sunspots[i] ; s2 &lt;- sunspot.month[i]
cbind(i = i, time = time(sunspots)[i], sunspots = s1, ss.month = s2,
      perc.diff = round(100*2*abs(s1-s2)/(s1+s2), 1))

## How to recreate the "old" sunspot.month (R &lt;= 3.0.3):
.sunspot.diff &lt;- cbind(
    i = c(1202L, 1256L, 1258L, 1301L, 1407L, 1429L, 1452L, 1455L,
          1663L, 2151L, 2329L, 2498L, 2594L, 2694L, 2819L),
    res10 = c(1L, 1L, 1L, -1L, -1L, -1L, 1L, -1L,
          1L, 1L, 1L, 1L, 1L, 20L, 1L))
ssm0 &lt;- sunspot.month[1:2988]
with(as.data.frame(.sunspot.diff), ssm0[i] &lt;&lt;- ssm0[i] - res10/10)
sunspot.month.0 &lt;- ts(ssm0, start = 1749, frequency = 12)
</pre>


</body></html>
